import request from "@/utils/request";

// 查询补考管理列表
export function listResitExam(query) {
  return request({
    url: "/resitExam/resitExam/list",
    method: "get",
    params: query,
  });
}

// 查询补考管理详细
export function getResitExam(resitId) {
  return request({
    url: "/resitExam/resitExam/" + resitId,
    method: "get",
  });
}

// 新增补考管理
export function addResitExam(data) {
  return request({
    url: "/resitExam/resitExam",
    method: "post",
    data: data,
  });
}

// 修改补考管理
export function updateResitExam(data) {
  return request({
    url: "/resitExam/resitExam",
    method: "put",
    data: data,
  });
}

// 删除补考管理
export function delResitExam(resitId) {
  return request({
    url: "/resitExam/resitExam/" + resitId,
    method: "delete",
  });
}

// 检查成绩是否已申请补考
export function checkScoreResitExam(userId, subjectId, scoreId) {
  return request({
    url: "/resitExam/resitExam/check",
    method: "get",
    params: {
      userId: userId,
      subjectId: subjectId,
      scoreId: scoreId,
    },
  });
}
